package com.HuiShou.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.HuiShou.common.annotation.Excel;
import com.HuiShou.common.core.domain.BaseEntity;

/**
 * 订单对象 recycle_order
 * 
 * @author lyz
 * @date 2025-03-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class UserOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /**  */
    @TableId(value = "order_id")
    private String orderId;

    /** 订单唯一编号 */
    @Excel(name = "订单唯一编号")
    private String orderNo;

    /** 客户 */
    @Excel(name = "客户")
    private Long clientId;

    /** 收运人员 */
    @Excel(name = "收运人员")
    private Long collectorId;

    /** 重量 */
    @Excel(name = "重量")
    private BigDecimal weight;

    /** 单价（元/Kg） */
    @Excel(name = "单价", readConverterExp = "元=/Kg")
    private BigDecimal unitPrice;

    /** 价值 */
    @Excel(name = "价值")
    private BigDecimal totalValue;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    /** 纬度 */
    @Excel(name = "纬度")
    private Double latitude;
    /** 经度 */
    @Excel(name = "经度")
    private Double longitude;

    /** 图片 */
    @Excel(name = "图片")
    private String images;

    /** 置信度 */
    @Excel(name = "置信度")
    private Double confidence;

    /** 类别 */
    @Excel(name = "类别")
    private String labels;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    /** 订单地址 */
    @Excel(name = "订单地址")
    private String address;

    @TableField(exist = false)
    private Double distance;

    /** 用户纬度 */
    @TableField(exist = false)
    private Double userLatitude;

    /** 用户经度 */
    @TableField(exist = false)
    private Double userLongitude;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("orderId", getOrderId())
                .append("orderNo", getOrderNo())
                .append("clientId", getClientId())
                .append("longitude",getLongitude())
                .append("latitude",getLatitude())
                .append("collectorId", getCollectorId())
                .append("weight", getWeight())
                .append("unitPrice", getUnitPrice())
                .append("totalValue", getTotalValue())
                .append("status", getStatus())
                .append("images", getImages())
                .append("confidence", getConfidence())
                .append("labels", getLabels())
                .append("createdAt", getCreatedAt())
                .append("updatedAt", getUpdatedAt())
                .append("address", getAddress())
                .toString();
    }
}
